﻿/************************************************************************************ 
 * EngineSettings.cs
 * 
 * Author      : Hristo Hristov
 * Datum       : 29.04.2011
 * Version     : 1.0
 * Revision    : 4
 * Description : An derivative of the default Settings that contains 
 *               the setting properties specific of the NOVA framework.
 *               This class should not be subclassed! Use the base class Settings
 *               instead.
 * 
 *************************************************************************************/


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Content;

namespace NOVA
{
    /// <summary>
    /// This class represents all settings of the NOVA framework.
    /// </summary>
    public sealed class EngineSettings : Settings
    {
        public EngineSettings()
        {
            // Save the type of the class for serializing in the base class
            typeDerivative = typeof(EngineSettings);
        }

        // The static instance of this class used for save method
        private static EngineSettings instance = new EngineSettings();

        // Gets the current instance through which the Save method can be accessed
        public static EngineSettings Current { get { return instance; } }

        // Members
        public static bool ComplexLightning = true;

        public static bool HardMovement = false;

        #region
            public static Matrix ViewMatrix;
            public static Matrix ProjectionMatrix;
            public static GraphicsDeviceManager GraphicsDeviceManager;
            public static GraphicsDevice GraphicsDevice;
        #endregion

        #region PS Eye Camera
            public static int AutoGain = 0;
            public static int AutoExposure = 0;
            public static int AutoWhiteBalance = 0;
            public static int Exposure = 100;
            public static int Gain = 30;
            public static int WhiteBalanceBlue = 50;
            public static int WhiteBalanceGreen = 50;
            public static int WhiteBalanceRed = 50;        
        #endregion

        #region Move Controller 
            #region Runtime Data
                internal static Color MoveControllerColor = new Color(0, 0, 0);
                internal static Matrix MoveControllerCalibRotation = Matrix.Identity;
            #endregion

            #region Default Calibration data
                #region Accelerometers
                    public static int AccMinX = -4300;//-4400;
                    public static int AccMaxX = 4300;// 4400;
                    public static int AccMinY = -4300;//-4580;
                    public static int AccMaxY = 4300;//4170;
                    public static int AccMinZ = -4300;//-4570;
                    public static int AccMaxZ = 4300;//4200;
                #endregion
                #region Magnetometers
                    public static int MagMinX = -150;//-184;
                    public static int MagMaxX = 150;//104;
                    public static int MagMinY = -150;//-251;
                    public static int MagMaxY = 150;// 43;
                    public static int MagMinZ = -150;//-190;
                    public static int MagMaxZ = 150;// 93;
                #endregion
                #region Gyrometers
                    public static int GyrMinX = -640;
                    public static int GyrMaxX = 640;
                    public static int GyrMinY = -640;
                    public static int GyrMaxY = 640;
                    public static int GyrMinZ = -640;
                    public static int GyrMaxZ = 640;
                #endregion
            #endregion  
        #endregion        
    }
}
